package hrms.service;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Service;

import hrms.dao.HistoryDao;
import hrms.entity.History;
import hrms.util.PageUtil;
import hrms.util.Result;

@Service("historyService")
public class HistoryServiceImpl implements HistoryService{
	@Resource(name="historyDao")
	private HistoryDao dao;

	public Result<List<History>> findByPage(String pages ,HttpServletResponse res) {
		String message = "History";
		return new PageUtil<History>().findByPage(pages, res, dao, message);
	}
	
	public Result<Map<String, Integer>> pageTotal(HttpServletRequest req){
		String message = "History";
		return PageUtil.pageTotal(req, message);
	}

	public Result<List<History>> search(String name) {

		return null;
	}

	public List<History> Excel() {
		List<History> list = dao.findAll(1,dao.findRow());
		return list;
	}
}
